import Vue from 'vue'
import Router from 'vue-router'

import Home from '@/pages/Home/Home'
// 个人中心
import User from '@/pages/User/User'
// 红包
import RedPacket from '@/pages/Red-packet/Red-packet'
// 红包详情
import RedPacketDetail from '@/pages/Red-packet/Red-packet-detail/Red-packet-detail'
// 积分商城首页
import integral from '@/pages/integral/integral'
// 底部
import Footer from '@/pages/Footer/Footer'
// 拼团
import Group from '@/pages/Group/Group'
// 个人中心头部
import UserHeader from '@/pages/User/components/header'
// 公共轮播
import CommonBanner from '@/pages/Common-banner/Common-banner'
// 公共推荐
import CommonRecommend from '@/pages/Common-recommend/Common-recommend'
// 公共商品列表
import CommonGoodsList from '@/pages/Common-goods-List/Common-goods-List'
// 公共标题样式
import CommonTel from '@/pages/Common-tel/Common-tel'
// 会员商城
import Vip from '@/pages/Vip/Vip'
// 会员详情
import VipDetail from '@/pages/Vip/Vip-detail/Vip-detail'
// 会员搜索
import VipSearch from '@/pages/Vip/Vip-search/Vip-search'
// 会员搜索列表
import VipList from '@/pages/Vip/Vip-list/Vip-list'
// 积分商城详情页
import IntegralDetail from '@/pages/integral/integral-detail/integral-detail'
// 会员分类列表
import VipClassifyList from '@/pages/Vip/components/Vip-classify-list'
// 加盟页面有商户
import JoinIn from '@/pages/Join-in/Join-in'
// 加盟页面
import Join from '@/pages/Join/Join'
// 店铺
import Shop from '@/pages/Shop/Shop'
// 店铺详情
import ShopDetail from '@/pages/Shop/shopDetail/shopDetail'
// 查看店铺头部
import ShopHeader from '@/pages/Shop/components/Shop-header'
// 个人中心设置
import UserSetUp from '@/pages/User/User-set-up/User-set-up'
// 个人中心编辑设置
import UserSetUpEdit from '@/pages/User/User-set-up/User-set-up-edit/User-set-up-edit'
// 个人中心消息列表
import UserNews from '@/pages/User/User-news/User-news'
// 个人中心我的积分
import UserIntegral from '@/pages/User/User-integral/User-integral'
// 个人中心我的订单
import UserOrder from '@/pages/User/User-order/User-order'
// 个人中心我的收藏
import UserCollection from '@/pages/User/User-collection/User-collection'
// 个人中心我的拼团
import UserGroup from '@/pages/User/User-group/User-group'
// 个人中心我的砍价
import UserBargain from '@/pages/User/User-bargain/User-bargain'
// 个人中心我的购物车
import UserCart from '@/pages/User/User-cart/User-cart'
// 个人中心我的钱包
import UserMoney from '@/pages/User/User-money/User-money'
// 绑定手机号
import Login from '@/pages/Login/Login'
// 换绑手机号
import changePhone from '@/pages/Login/change_phone'
// 订单
import Order from '@/pages/User/Order/Order'
// 新增收货地址
import NewAddress from '@/pages/User/Order/NewAddress'
// 选择收货地址
import Address from '@/pages/User/Order/Address'
// 积分订单详情
import Details from '@/pages/User/User-Order/User-details'
// 确认订单
import Corder from '@/pages/Order/Order/order'
// 购物车
import OrderCart from '@/pages/Order/Order_cart/Order_cart'
// 地址列表
import AddressList from '@/pages/Address/Address-list'
// 添加地址
import AddressAdd from '@/pages/Address/Address-add'
// 编辑地址
import AddressEdit from '@/pages/Address/Address-edit'
// 会员商城订单列表
import vipOrderList from '@/pages/Order/Order-list/Order-list'
// 会员商城订单列表
import Gorder from '@/pages/Order/cart_order/cart_order'
// 会员订单详情
import orderDetail from '@/pages/Order/Order-detail/Order-detail'
// 添加地址
import orderAdd from '@/pages/Order/order-add/order-add'
// 秒杀
import Spike from '@/pages/Spike/Spike'
// 秒杀详情
import SpikeDetail from '@/pages/Spike/Spike-detail/Spike-detail'
// 秒杀确认订单
import seckillOrder from '@/pages/Order/seckill-order/seckill-order'
// 秒杀订单列表
import SpikeOrderList from '@/pages/Order/seckill-order-list/seckill-order-list'
// 秒杀订单详情
import seckillOrderDetail from '@/pages/Order/seckill-order-detail/seckill-order-detail'
// 秒杀搜索
import SpikeSearch from '@/pages/Spike/Spike-search/Spike-search'
// 秒杀搜索列表
import SpikeSearchList from '@/pages/Spike/Spike-search-list/Spike-search-list'
// 充值升级Vip
import openVip from '@/pages/User/open-vip/open-vip'
// 物流
import logistics from '@/pages/User/logistics/logistics'
// 物流2
import logistics2 from '@/pages/User/logistics/logistics2'
// 公告详情
import gonggao from '@/pages/User/gonggao/gonggao'
// 测试
import aaa from '@/pages/aaa/aaa'
// 拼团首页
import AssemblePage from '@/pages/Assemble/AssemblePage'
// 拼团详情
import AssembleDetails from '@/pages/Assemble/details'
// 拼团订单确认
import AssembleOrder from '@/pages/Assemble/Order'
// 我的拼团
import MyRegiment from '@/pages/Assemble/MyRegiment'
// 拼团店铺AssShop
import AssShop from '@/pages/Assemble/AssShop'
// 拼团支付payment
import AssPayment from '@/pages/Assemble/Payment'
// 拼团支付AssMyOrder
import AssMyOrder from '@/pages/Assemble/MyOrder'
// 拼团详情AssMeration
import AssMeration from '@/pages/Assemble/AssMeration'
// 拼团订单详情OrderDetails
import OrderDetails from '@/pages/Assemble/OrderDetails'
Vue.use(Router)
const router = new Router({
  mode: 'history',
  routes: [
    // {
    //   path: '/foo',
    //   component: Foo,
    //   beforeEnter: (to, from, next) => {
    //     // ...
    //   }
    // }
    {
      path: '/aaa',
      component: aaa,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/',
      component: Home,
      meta: {
        title: '',
        requireAuth: true
      },
      children: [
        {
          path: '/home/VipDetail/:id',
          name: 'VipDetail',
          component: VipDetail,
          meta: {
            title: '',
            requireAuth: true
          }
        }
      ]
    },
    {
      path: '/Login',
      component: Login,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/integral',
      name: 'integral',
      component: integral,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/Group',
      name: 'Group',
      component: Group,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/User',
      name: 'User',
      component: User,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/Spike',
      name: 'Spike',
      component: Spike,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/SpikeDetail/:id',
      name: 'SpikeDetail',
      component: SpikeDetail,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/SpikeOrderList',
      name: 'SpikeOrderList',
      component: SpikeOrderList,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/seckillOrderDetail/:id',
      name: 'seckillOrderDetail',
      component: seckillOrderDetail,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/orderDetail/:id',
      name: 'orderDetail',
      component: orderDetail,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/SpikeSearch',
      name: 'SpikeSearch',
      component: SpikeSearch,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/SpikeSearchList',
      name: 'SpikeSearchList',
      component: SpikeSearchList,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/Vip',
      component: Vip,
      meta: {
        title: '',
        requireAuth: true,
        keepAlive: true
      },
      children: [
        {
          path: '/Vip/VipDetail/:id',
          name: 'VipDetail',
          component: VipDetail,
          meta: {
            title: '',
            requireAuth: true
          }
        }
      ]
    },
    {
      path: '/VipDetail/:id',
      name: 'VipDetail',
      component: VipDetail,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/VipSearch',
      name: 'VipSearch',
      component: VipSearch,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/VipList',
      name: 'VipList',
      component: VipList,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/logistics/:id',
      name: 'logistics',
      component: logistics,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/logistics2/:id',
      name: 'logistics2',
      component: logistics2,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/Shop/:id',
      component: Shop,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/JoinIn/:id',
      component: JoinIn,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/Join',
      component: Join,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/ShopDetail/:id',
      component: ShopDetail,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/RedPacket',
      name: 'RedPacket',
      component: RedPacket,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/RedPacketDetail/:id/:money',
      component: RedPacketDetail,
      name: '红包',
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/Corder',
      component: Corder,
      name: 'Corder'
    },
    {
      path: '/OrderCart',
      component: OrderCart,
      name: 'OrderCart',
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/UserSetUp',
      component: UserSetUp,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/openVip',
      name: 'openVip',
      component: openVip,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/seckillOrder',
      name: 'seckillOrder',
      component: seckillOrder,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/UserNews',
      component: UserNews,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/gonggao',
      component: gonggao,
      meta: {
        title: '',
        requireAuth: true
      }
    },
    {
      path: '/UserCollection',
      component: UserCollection
    },
    {
      path: '/UserMoney',
      component: UserMoney
    },
    {
      path: '/UserCart',
      component: UserCart
    },
    {
      path: '/UserBargain',
      component: UserBargain
    },
    {
      path: '/UserGroup',
      component: UserGroup
    },
    {
      path: '/UserOrder',
      component: UserOrder
    },
    {
      path: '/UserIntegral',
      component: UserIntegral
    },
    {
      path: '/ShopHeader',
      component: ShopHeader
    },
    {
      path: '/UserSetUpEdit',
      component: UserSetUpEdit
    },
    {
      path: '/Footer',
      component: Footer
    },
    {
      path: '/UserHeader',
      component: UserHeader
    },
    {
      path: '/CommonBanner',
      component: CommonBanner
    },
    {
      path: '/CommonRecommend',
      component: CommonRecommend
    },
    {
      path: '/CommonTel',
      component: CommonTel
    },
    {
      path: '/CommonGoodsList',
      component: CommonGoodsList
    },
    {
      path: '/IntegralDetail/:id',
      name: 'IntegralDetail',
      component: IntegralDetail
    },
    {
      path: '/VipClassifyList',
      component: VipClassifyList
    },
    {
      path: '/Order/:ecvaiD/:cvaiD_2/:ecvaiD_3/:consignee/:address/:phone/:num/:id',
      name:'Order',
      component: Order
    },
    {
      path: '/NewAddress/:id/:num',
      name: 'NewAddress',
      component: NewAddress
    },
    {
      path: '/Address',
      name:'Address',
      component: Address
    },
    {
      path: '/Details/:order_parent_sn',
      name: 'Details',
      component: Details
    },
    {
      path: '/AddressList',
      name: 'AddressList',
      component: AddressList
    },
    {
      path: '/AddressAdd',
      name: 'AddressAdd',
      component: AddressAdd
    },
    {
      path: '/AddressEdit/:id',
      name: 'AddressEdit',
      component: AddressEdit
    },
    {
      path: '/vipOrderList',
      name: 'vipOrderList',
      component: vipOrderList
    },
    {
      path: '/Gorder',
      name: 'Gorder',
      component: Gorder
    },
    {
      path: '/orderAdd',
      name: 'orderAdd',
      component: orderAdd
    },

    {
      path: '/assemble',
      name:'assemble',
      component: AssemblePage
    },
    {
      path: '/assdetails/:id',
      name:'AssembleDetails',
      component: AssembleDetails
    },
    {
      // path: '/assder/:id/:spec',
      path: '/assder',
      name:'AssembleOrder',
      component: AssembleOrder
    },
    {
      path: '/regiment',
      name:'MyRegiment  ',
      component: MyRegiment
    },
    {
      path: '/asshop',
      name:'AssShop',
      component: AssShop
    },
    {
      path: '/asspayment',
      name:'AssPayment',
      component: AssPayment
    },
    {
      path: '/assMyOrder',
      name:'AssMyOrder',
      component: AssMyOrder
    },
    {
      path: '/assMeration',
      name:'AssMeration',
      component: AssMeration
    },
    {
      path: '/assOrderDetails/:order_sn2',
      name:'OrderDetails',
      component: OrderDetails
    },
    {
      path: '/changePhone',
      name:'changePhone',
      component: changePhone
    }
  ]
})

export default router;
